{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">

    <!--顶部搜索筛选-->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-body">
                    <form class="form-inline searchForm" id="searchForm" action="{:url('index')}" method="GET">

                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$member_id ? $member_id : '' ;}"
                                   name="member_id" id="member_id" class="form-control input-sm"
                                   placeholder="用户融云ID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$me_uid ? $me_uid : '' ;}"
                                   name="me_uid" id="me_uid" class="form-control input-sm"
                                   placeholder="用户UID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$me_phone ? $me_phone : '' ;}"
                                   name="me_phone" id="me_phone" class="form-control input-sm"
                                   placeholder="用户手机号/昵称搜索">
                        </div>
<br/>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="k_stamp_income" id="k_stamp_income" class="form-control input-sm index-search">
                                <option value="">-收入可提现油票（筛选）-</option>
                                {foreach $k_stamp_income_arr as $key=>$value}
                                <option {if isset($k_stamp_income) && $k_stamp_income==$value['type_id']}selected{/if} value="{$value['type_id']}">【{$value['name']}】</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="bk_stamp_income" id="bk_stamp_income" class="form-control input-sm index-search">
                                <option value="">-收入不可提现油票（筛选）-</option>
                                {foreach $bk_stamp_income_arr as $key=>$value}
                                <option {if isset($bk_stamp_income) && $bk_stamp_income==$value['type_id']}selected{/if} value="{$value['type_id']}">【{$value['name']}】</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="stamp_disburse" id="stamp_disburse" class="form-control input-sm index-search">
                                <option value="">-支出油票（筛选）-</option>
                                {foreach $stamp_disburse_arr as $key=>$value}
                                <option {if isset($stamp_disburse) && $stamp_disburse==$value['type_id']}selected{/if} value="{$value['type_id']}">【{$value['name']}】</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="exposure_income" id="exposure_income" class="form-control input-sm index-search">
                                <option value="">-收入曝光（筛选）-</option>
                                {foreach $exposure_income_arr as $key=>$value}
                                <option {if isset($exposure_income) && $exposure_income==$value['type_id']}selected{/if} value="{$value['type_id']}">【{$value['name']}】</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="exposure_disburse" id="exposure_disburse" class="form-control input-sm index-search">
                                <option value="">-支出曝光（筛选）-</option>
                                {foreach $exposure_disburse_arr as $key=>$value}
                                <option {if isset($exposure_disburse) && $exposure_disburse==$value['type_id']}selected{/if} value="{$value['type_id']}">【{$value['name']}】</option>
                                {/foreach}
                            </select>
                        </div>

                        <div class="form-group" style="padding-top: 3px;width: 32%;">
                            <input style="width: 50%" value="{$add_time|default=''}" readonly name="add_time" id="add_time"
                                   class="form-control input-sm indexSearchDateRange" placeholder="时间搜索">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#add_time',
                                type: 'datetime',
                                range: true,
                            });
                        </script>

<br/>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$d_member_id ? $d_member_id : '' ;}"
                                   name="d_member_id" id="d_member_id" class="form-control input-sm"
                                   placeholder="对方融云ID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$d_me_uid ? $d_me_uid : '' ;}"
                                   name="d_me_uid" id="d_me_uid" class="form-control input-sm"
                                   placeholder="对方UID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$d_me_phone ? $d_me_phone : '' ;}"
                                   name="d_me_phone" id="d_me_phone" class="form-control input-sm"
                                   placeholder="对方手机号/昵称搜索">
                        </div>

<br/>
                        <div class="form-group" style="padding-top: 3px;">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                            </button>
                        </div>

                        <div class="form-group" style="padding-top: 3px;">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空查询
                            </button>
                        </div>

                    </form>
                    <br/>
                    <div class="form-group" style="padding-top: 3px;">
                        <b><span style="color: green">{$zhuanword}</span></b>
                        <b><span style="color: red">{$txword}</span></b>
                        <b><span style="color: blue">{$mqword}</span></b>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="box">

                <!--数据列表顶部-->
                <div class="box-header">
                    <div>
                        <a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
                            <i class="fa fa-refresh"></i> 刷新
                        </a>
                    </div>
                </div>

                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered datatable" width="100%">
                        <thead>
                        <tr style="white-space: nowrap">
                            <th style="text-align: center;vertical-align: middle;width: 5%">日志ID</th>
                            <th style="text-align: center;vertical-align: middle;width: 15%">用户信息</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">手机号</th>
                            <th style="text-align: center;vertical-align: middle;width: 15%">账单类型</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">收支类型</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">财产类型</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">操作数量</th>
                            <th style="text-align: center;vertical-align: middle;width: 5%">操作后数量</th>
                            <th style="text-align: center;vertical-align: middle;width: 10%">时间</th>
                            <th style="text-align: center;vertical-align: middle;width: 15%">备注</th>
                            <th style="text-align: center;vertical-align: middle;width: 15%">对方用户信息</th>
<!--                            <th style="text-align: center;vertical-align: middle;width: 5%">对方手机号</th>-->
<!--                            <th style="text-align: center;vertical-align: middle;width: 10%">操作</th>-->
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}
                        <tr>
                            <td style="text-align: center;vertical-align: middle;">{$item.id}</td>
                            <td style="text-align: center;vertical-align: middle;">【融云ID：{$item.member_id}】【UID：{$item.me_uid}】【昵称：{$item.me_nick_name}】</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_phone}</td>
                            <td style="text-align: center;vertical-align: middle;">
                                {$item.type_word}
                                {if $item.rebate_type_word !='' && $item.rebate_type == 0}
                                <span style="color: blue">{$item.rebate_type_word}</span>
                                {/if}
                                {if $item.rebate_type_word !='' && $item.rebate_type == 1}
                                <span style="color: #db0ead">{$item.rebate_type_word}</span>
                                {/if}
                                {if $item.rebate_type_word !='' && $item.rebate_type == 2}
                                <span style="color: tomato">{$item.rebate_type_word}</span>
                                {/if}
                            </td>
                            {if $item.status==1}
                            <td style="text-align: center;vertical-align: middle;color: green;">{$item.status_word}</td>
                            {/if}
                            {if $item.status==2}
                            <td style="text-align: center;vertical-align: middle;color: red;">{$item.status_word}</td>
                            {/if}
                            <td style="text-align: center;vertical-align: middle;">{$item.money_type_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.money}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.member_money}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.add_time}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.content}</td>
                            {if $item.d_member_id==0}
                            <td style="text-align: center;vertical-align: middle;">-</td>
                            <td style="text-align: center;vertical-align: middle;">-</td>
                            {/if}
                            {if $item.d_member_id!=0}
                            <td style="text-align: center;vertical-align: middle;">【融云ID：{$item.d_member_id}】【UID：{$item.d_me_uid}】【昵称：{$item.d_me_nick_name}】</td>
<!--                            <td style="text-align: center;vertical-align: middle;">{$item.d_me_phone}</td>-->
                            {/if}
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                <!-- 数据列表底部 -->
                <div class="box-footer">
                    {$page|raw}
                    <label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
                        <small>共{$total}条记录</small>&nbsp;
                        <small>每页显示</small>
                        &nbsp;
                        <select class="input-sm" onchange="changePerPage(this)">
                            <option value="10" {if $admin.per_page==10}selected{/if}>10</option>
                            <option value="20" {if $admin.per_page==20}selected{/if}>20</option>
                            <option value="30" {if $admin.per_page==30}selected{/if}>30</option>
                            <option value="50" {if $admin.per_page==50}selected{/if}>50</option>
                            <option value="100" {if $admin.per_page==100}selected{/if}>100</option>
                        </select>
                        &nbsp;
                        <small>条记录</small>
                    </label>
                </div>

            </div>
        </div>
    </div>
</section>
<script>
    $(function () {
        $('.photo-list img').on('click', function () {
            layer.photos({
                photos: '.photo-list',
                shadeClose: false,
                closeBtn: 2,
                anim: 5
            });
        })
    });
</script>
{/block}

